package com.sikulifang.bank.simulation.util;

import cn.hutool.core.io.FileUtil;
import org.springframework.util.ResourceUtils;

import java.io.File;
import java.io.FileNotFoundException;

/**
 * ClassName PathUtil
 * Description PathUtil
 *
 * @author Yat
 * Date 2023年6月21日, 0021 9:19
 * version 1.0
 */
public class PathUtil {

    public static File getPath(String path) throws FileNotFoundException {
        File file = new File(path);
        if (!FileUtil.exist(file)) {
            file = ResourceUtils.getFile("classpath:" + path);
        }
        return file;
    }
}
